Skip to content

fix(types): remove stale sub-component refs causing TS2589#39

Merged
bntvllnt merged 1 commit intomainfrom
fix/ts2589-type-depth
Mar 27, 2026
Merged

fix(types): remove stale sub-component refs causing TS2589#39
bntvllnt merged 1 commit intomainfrom
fix/ts2589-type-depth

Conversation

@bntvllnt
Copy link
Copy Markdown
Contributor

Summary

  • Remove 3 stale ComponentApi imports from src/component/_generated/api.ts (rateLimiter, usageAggregate, crons) — left over from v0.2.0 which removed these sub-components but didn't regenerate the file
  • Remove 3 phantom dependencies from package.json (@convex-dev/rate-limiter, @convex-dev/aggregate, @convex-dev/crons)
  • Remove stale rate-limiting keyword

Root Cause

_generated/api.ts declared 4 sub-component ComponentApi types when only shardedCounter exists. Each ComponentApi import adds a level of nesting through Convex's recursive FilterApi type. With 4 (3 phantom), host apps hit TypeScript's TS2589 depth limit when using action()/query() from _generated/server.

Test Plan

  • pnpm lint passes
  • pnpm typecheck passes
  • pnpm build passes
  • pnpm test passes (82/82 tests)
  • Grep confirms zero source imports of removed packages
  • Publish new version and verify host app typechecks cleanly

Closes #38

@bntvllnt bntvllnt self-assigned this Mar 27, 2026
@bntvllnt bntvllnt merged commit 61796d1 into main Mar 27, 2026
4 checks passed
@bntvllnt bntvllnt deleted the fix/ts2589-type-depth branch March 27, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TS2589: component types too deep — breaks host app typecheck

1 participant